# 7-5 数字查找求和【分支循环】

s = input()
k = input()
def baseBe(s):
    base = ""
    num = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]
    for i in s:
        if i in num:
            base += i
    return base
a=int(baseBe(s))
b=int(baseBe(k))
print(a+b)